//
//  HBChapterModel.h
//  HeartBeat
//
//  Created by karong on 2023/8/23.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
@interface HBChaptersModel : NSObject
@property (nonatomic, assign) NSInteger total;
@property (nonatomic, strong) NSArray * items;
@end

@interface HBChapterModel : NSObject
///傳統章節id
@property (nonatomic, assign) NSInteger id;//
///章節id
//@property (nonatomic, assign) NSInteger chapter_id;
///小說id
@property (nonatomic, assign) NSInteger book_id;//
///章節標題
@property (nonatomic, strong) NSString * title;//
///標題前綴
@property (nonatomic, strong) NSString * pre_title;
///章節簡介
@property (nonatomic, strong) NSString * desc;//
///章節字數
@property (nonatomic, assign) NSInteger word;//
///章節序号
@property (nonatomic, assign) NSInteger sort;//
///章節创建時間s
@property (nonatomic, assign) NSTimeInterval created;//
///章節更新時間s
@property (nonatomic, assign) NSTimeInterval updated;//
///章節是否购买 1-已购买 -未购买
@property (nonatomic, assign) NSInteger _is_buy;
///是否vip
@property (nonatomic, assign) NSInteger _is_vip;//
///書币 0-免费
@property (nonatomic, assign) NSInteger coins;
///是否已讀
@property (nonatomic, assign) BOOL had_read;
///章節狀態 0 未提交 1 審核中 2 審核通過 3 審核失敗 4 未提交 5 審核中
@property (nonatomic, assign) NSInteger status;
///章節狀態文案
@property (nonatomic, strong) NSString * status_txt;
/**
 傳統小說專用
 */
///章節內容
@property (nonatomic, strong) NSString * content;
///下一章ID
@property (nonatomic, assign) NSInteger next_chapter_id;
///上一章ID
@property (nonatomic, assign) NSInteger pre_chapter_id;
///章節是否需要解鎖
@property (nonatomic, assign) NSInteger need_buy;
///百分比
@property (assign, nonatomic)NSInteger position;
///当前第几页
@property (assign, nonatomic)NSInteger pageIndex;
///文章总共多少页
@property (assign, nonatomic)NSInteger pageCount;
///分页节点
@property (strong, nonatomic) NSMutableArray *pageArray;
@property (strong, nonatomic) NSAttributedString *attributedString;
@property (nonatomic, assign) BOOL needToastAotuPay;
- (void)setContentPage;
- (NSAttributedString *)getContentAtt:(NSInteger)page;
- (NSArray *)positionDatas;
- (NSInteger)getChangeIndex:(NSNumber *)position;

@end

NS_ASSUME_NONNULL_END
